/*
 *
 *      Copyright (c) 2018-2025, waterx All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: waterx
 *
 */

package com.example.tenant.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.tenant.Converter.CustomStringConverter;
import com.example.tenant.Converter.LongStringConverter;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author waterx
 * @since 2017-10-29
 */
@Data
@ColumnWidth(10)
public class SysUser extends Model<SysUser> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    @ExcelProperty("user_id")
    private String userId;

    /**
     * 用户名
     */
    @ExcelProperty("username")
    private String username;

    /**
     * 密码
     */
    @ExcelProperty("password")
    private String password;

    /**
     * 随机盐
     */
    @ExcelProperty("salt")
    private String salt;

    /**
     * 锁定标记
     */
    @ExcelProperty("lock_flag")
    private String lockFlag;

    /**
     * 密码过期标记
     */
    @ExcelProperty("password_expire_flag")
    private String passwordExpireFlag;

    /**
     * 密码修改时间
     */
    @ExcelProperty("password_modify_time")
    private Date passwordModifyTime;

    /**
     * 手机号
     */
    @ExcelProperty("phone")
    private String phone;

    /**
     * 头像
     */
    @ExcelProperty("avatar")
    private String avatar;

    /**
     * 部门ID
     */
    @ExcelProperty("dept_id")
    private String deptId;

    /**
     * 微信openid
     */
    @ExcelProperty("wx_openid")
    private String wxOpenid;

    /**
     * 微信小程序openId
     */
    @ExcelProperty("mini_openid")
    private String miniOpenid;

    /**
     * QQ openid
     */
    @ExcelProperty("qq_openid")
    private String qqOpenid;

    /**
     * 码云唯一标识
     */
    @ExcelProperty("gitee_login")
    private String giteeLogin;

    /**
     * 开源中国唯一标识
     */
    @ExcelProperty("osc_id")
    private String oscId;

    /**
     * 企微微信 userid
     */
    @ExcelProperty("wx_cp_userid")
    private String wxCpUserid;

    /**
     * 钉钉 userid
     */
    @ExcelProperty("wx_ding_userid")
    private String wxDingUserid;

    /**
     * 昵称
     */
    @ExcelProperty("nickname")
    private String nickname;

    /**
     * 姓名
     */
    @ExcelProperty("name")
    private String name;

    /**
     * 邮箱
     */
    @ExcelProperty("email")
    private String email;

    /**
     * 用户编码
     */
    @ExcelProperty("user_code")
    private String userCode;

    /**
     * 性别
     */
    @ExcelProperty("sex")
    private String sex;

    /**
     * 出生日期
     */
    @ExcelProperty("birthday")
    private Date birthday;

    /**
     * 出生地
     */
    @ExcelProperty("birthplace")
    private String birthplace;

    /**
     * 职务
     */
    @ExcelProperty("duty")
    private String duty;

    /**
     * 入职时间
     */
    @ExcelProperty("entry_time")
    private Date entryTime;

    /**
     * 民族
     */
    @ExcelProperty("nation")
    private String nation;

    /**
     * 国籍
     */
    @ExcelProperty("nationality")
    private String nationality;

    /**
     * 证件号码
     */
    @ExcelProperty("paper_num")
    private String paperNum;

    /**
     * 证件类型
     */
    @ExcelProperty("paper_type")
    private String paperType;

    /**
     * 职级
     */
    @ExcelProperty("rank")
    private String rank;

    /**
     * 退休时间
     */
    @ExcelProperty("retirement_time")
    private Date retirementTime;

    /**
     * 备注
     */
    @ExcelProperty("remark")
    private String remark;

    /**
     * 来源
     */
    @ExcelProperty("source")
    private String source;

    /**
     * 排序号
     */
    @ExcelProperty("order_num")
    private Integer orderNum;

    /**
     * 数据标签
     */
    @ExcelProperty("data_flag")
    private String dataFlag;

    /**
     * 密集
     */
    @ExcelProperty("secret_level")
    private Integer secretLevel;

    /**
     * 创建人
     */
    @ExcelProperty(value = "create_by", converter = CustomStringConverter.class)
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @ExcelProperty("create_time")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty(value = "update_by", converter = CustomStringConverter.class)
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty("update_time")
    private Date updateTime;

    /**
     * 删除标记
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelProperty("del_flag")
    private String delFlag;

    /**
     * 租户id
     */
    @ExcelProperty(value = "tenant_id", converter = LongStringConverter.class)
    private Long tenantId;

}
